conf = require("../config")
if not conf.luasnip.enabled then return {} end

return {
  "L3MON4D3/LuaSnip",
  event = "InsertEnter",
  version = "*",
  build = "make install_jsregexp",
  dependencies = {
    "rafamadriz/friendly-snippets",
  },
  config = function ()
    -- add VS Code style snippets
    require("luasnip.loaders.from_vscode").lazy_load({
      exclude = {},
    })
    ls = require("luasnip")

    local verilog = require("../snippets/verilog")
    -- systemverilog and verilog
    ls.add_snippets("systemverilog", verilog.snippet())
    ls.add_snippets("verilog",       verilog.snippet())
  end
}
